using System;
using System.Collections.Generic;
using System.Windows.Forms;
using UmlDesigner.Gui;

namespace UmlDesigner
{
    static class Program
    {

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            try
            {
                MainForm form;
                string[] args = Environment.GetCommandLineArgs();

                if (args.Length > 1)
                {
                    form = new MainForm(args[1]);
                }
                else
                {
                    form = new MainForm(null);
                }

                Application.Run(form);
            }
            catch (Exception e)
            {
                ExceptionReport report = new ExceptionReport(e);
                report.ShowDialog();
            }
        }
    }
}